Optimal. Leaf size=56 \[ \frac {\left (a^2-b^2\right ) \sin (c+d x)}{d}-\frac {(a-b)^2 \sin ^3(c+d x)}{3 d}+\frac {b^2 \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3676, 390, 206} \[ \frac {\left (a^2-b^2\right ) \sin (c+d x)}{d}-\frac {(a-b)^2 \sin ^3(c+d x)}{3 d}+\frac {b^2 \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 390
Rule 3676
Rubi steps
\begin {align*} \int \cos ^3(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a-(a-b) x^2\right )^2}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (a^2-b^2-(a-b)^2 x^2+\frac {b^2}{1-x^2}\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {\left (a^2-b^2\right ) \sin (c+d x)}{d}-\frac {(a-b)^2 \sin ^3(c+d x)}{3 d}+\frac {b^2 \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {b^2 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {\left (a^2-b^2\right ) \sin (c+d x)}{d}-\frac {(a-b)^2 \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.43, size = 71, normalized size = 1.27 \[ \frac {\sin (c+d x) \left (\frac {3 b^2 \tanh ^{-1}\left (\sqrt {\sin ^2(c+d x)}\right )}{\sqrt {\sin ^2(c+d x)}}-(a-b) \left ((a-b) \sin ^2(c+d x)-3 (a+b)\right )\right )}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.51, size = 79, normalized size = 1.41 \[ \frac {3 \, b^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, b^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, a^{2} + 2 \, a b - 4 \, b^{2}\right )} \sin \left (d x + c\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 3.02, size = 96, normalized size = 1.71 \[ -\frac {2 \, a^{2} \sin \left (d x + c\right )^{3} - 4 \, a b \sin \left (d x + c\right )^{3} + 2 \, b^{2} \sin \left (d x + c\right )^{3} - 3 \, b^{2} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 3 \, b^{2} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - 6 \, a^{2} \sin \left (d x + c\right ) + 6 \, b^{2} \sin \left (d x + c\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.62, size = 104, normalized size = 1.86 \[ -\frac {b^{2} \left (\sin ^{3}\left (d x +c \right )\right )}{3 d}-\frac {b^{2} \sin \left (d x +c \right )}{d}+\frac {b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {2 a b \left (\sin ^{3}\left (d x +c \right )\right )}{3 d}+\frac {\sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) a^{2}}{3 d}+\frac {2 a^{2} \sin \left (d x +c \right )}{3 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.65, size = 72, normalized size = 1.29 \[ -\frac {2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \sin \left (d x + c\right )^{3} - 3 \, b^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, b^{2} \log \left (\sin \left (d x + c\right ) - 1\right ) - 6 \, {\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 14.04, size = 136, normalized size = 2.43 \[ \frac {2\,b^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {\left (2\,a^2-2\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {4\,a^2}{3}+\frac {16\,a\,b}{3}-\frac {20\,b^2}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,a^2-2\,b^2\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2} \cos ^{3}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________